package com.ygqh.baby.po;

import java.util.Date;

import com.ygqh.baby.ao.DataStatus;
import com.ygqh.baby.utils.DateConvertUtils;

public class YgProductActionGift {
	private Long id;

	private String actionDesc;

	private Date startDate;

	private Date endDate;

	private String actionProductids;

	private String giftProductids;

	private DataStatus status;

	private Date createTime;

	private String createBy;

	private Date updateTime;

	private String updateBy;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getActionDesc() {
		return actionDesc;
	}

	public void setActionDesc(String actionDesc) {
		this.actionDesc = actionDesc == null ? null : actionDesc.trim();
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getActionProductids() {
		return actionProductids;
	}

	public void setActionProductids(String actionProductids) {
		this.actionProductids = actionProductids == null ? null : actionProductids.trim();
	}

	public String getGiftProductids() {
		return giftProductids;
	}

	public void setGiftProductids(String giftProductids) {
		this.giftProductids = giftProductids == null ? null : giftProductids.trim();
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy == null ? null : createBy.trim();
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy == null ? null : updateBy.trim();
	}

	public DataStatus getStatus() {
		return status;
	}

	public void setStatus(DataStatus status) {
		this.status = status;
	}

	public Boolean isValid() {
		Date currentDate = new Date();
		if (startDate != null && endDate != null) {
			endDate = DateConvertUtils.addDay(endDate, 1);
			if (startDate.before(currentDate) && endDate.after(currentDate)) {
				return true;
			}
		}
		return false;

	}

}